class Solution
{
public:
    string oddString(vector<string> &words)
    {
        int n = words[0].size();
        map<vector<int>, int> diffCount;
        map<vector<int>, string> diffString;

        for (auto &word : words)
        {
            vector<int> diff(n - 1);
            for (int i = 1; i < n; ++i)
            {
                diff[i - 1] = word[i] - word[i - 1];
            }
            ++diffCount[diff];
            diffString[diff] = word;
        }

        for (auto &[diff, count] : diffCount)
        {
            if (count == 1)
            {
                return diffString[diff];
            }
        }
        return "";
    }
};